#include "myBTree.h"



int main(){
    char *str1 = (char*)malloc(1024);    
    char *str2 = (char*)malloc(1024);
    scanf("%s",str1);
    size_t sz = strlen(str1);
    if(str1[sz - 1] == '#'){
        int pos = 0;
        int* p = &pos;
        Print_post(TreeGrow(str1, p));
    }
    else{
        scanf("%s", str2);
        Print_post(Pre_In_MKTree(str1, str2, 0, (int)sz));
    }

    return 0;
}
